package com.tienon.message.Test;

import java.util.Date;

import javax.annotation.Resource;

import org.junit.Test;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.tienon.message.entity.Raw_msg_batch;
import com.tienon.message.mapper.Raw_msg_batchMapper;

public class TestRawMsgWrapper extends UnitTestEnv {

	@Resource
	private Raw_msg_batchMapper dao;
	
	@Test
	//@Transactional(propagation = Propagation.SUPPORTS)
	public void testInsert(){
		
		Raw_msg_batch raw = new Raw_msg_batch();
		int i = dao.getKey();
		System.out.println("====iii========"+i);
		raw.setBatId(888);
		raw.setSerail(i);
		raw.setBsnCd("123456");
		raw.setFilter(1);
		raw.setOccDate(new Date());
		raw.setSendTime(new Date());
		raw.setSendNow(1);
		raw.setBatSlice(1);
		raw.setMsgType(1);
		raw.setMsg("123456");
		raw.setSplitFlag(1);
		raw.setSendWay(1);
		raw.setBatOrder(1);
		raw.setSendTimes(1);
		raw.setPrior(1);
		raw.setReportFlag(1);
		raw.setBatId(111);
		raw.setOccDate(new Date());
		raw.setLinkFlag(1);
		raw.setState(1);
		raw.setOccTime(new Date());
		//System.out.println(dao.insertSelective(raw));
		System.out.println(dao.insert(raw));
		System.out.println("over");
		
	}
	
}
